Scenario #3108: Invalidate Sepa Mandate for Debitor

Properties

Required

Given

name value
bankAccountIBAN DE02701500000000594937
mandateValidTo 2025-09-30

SEPA-Mandate: DE02701500000000594937

HTTP GET "/api/hs/office/sepamandates?iban=DE02701500000000594937" \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }`
=> status: 200 OK 
[ {
  "uuid" : "5b9091af-340a-4f27-beb2-ec8c0487ee9b", // SEPA-Mandate: Test AG
  "debitor" : {
    "uuid" : "23a905b2-1889-49e6-9ae8-499a678f15ae", // Debitor: D-3101000 - Test AG - main debitor
    "debitorRel" : {
      "uuid" : "a7761701-f682-49e5-b77f-e6147af71fad",
      "anchor" : {
        "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // Person: Test AG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Test AG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "holder" : {
        "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // Person: Test AG
        "personType" : "LEGAL_PERSON",
        "tradeName" : "Test AG",
        "salutation" : null,
        "title" : null,
        "givenName" : null,
        "familyName" : null
      },
      "type" : "DEBITOR",
      "mark" : null,
      "contact" : {
        "uuid" : "74722eb7-48fd-431c-afaf-fb3a3a8b5f1c",
        "caption" : "Test AG - billing department",
        "postalAddress" : { },
        "emailAddresses" : {
          "main" : "billing@test-ag.example.org"
        },
        "phoneNumbers" : { }
      }
    },
    "debitorNumber" : "D-3101000",
    "debitorNumberSuffix" : "00",
    "partner" : {
      "uuid" : "ceaf680a-e52e-4625-b80f-fe70a66e6428", // Partner: P-31010 - Test AG
      "partnerNumber" : "P-31010",
      "partnerRel" : {
        "uuid" : "d8468486-cc0a-4797-b367-4c393953f190", // partnerRelationUuid
        "anchor" : {
          "uuid" : "bb7b76f1-1922-46aa-8c22-468c70c3a9fa", // Person: Hostsharing eG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Hostsharing eG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "holder" : {
          "uuid" : "1223603d-1a3b-4e0c-a244-027585d22eb2", // Person: Test AG
          "personType" : "LEGAL_PERSON",
          "tradeName" : "Test AG",
          "salutation" : null,
          "title" : null,
          "givenName" : null,
          "familyName" : null
        },
        "type" : "PARTNER",
        "mark" : null,
        "contact" : {
          "uuid" : "c9fdae44-bedc-4fb6-b5ad-f7016218fc25", // Contact: Test AG - China
          "caption" : "Test AG - China",
          "postalAddress" : {
            "country" : "China",
            "province" : "Guangdong Province",
            "city" : "Dongguan City",
            "street" : "No.2 Commercial Second Street",
            "district" : "Niushan Wei Wu",
            "department" : "Executive Board",
            "building" : "Thi Chi Koh Building"
          },
          "emailAddresses" : {
            "main" : "norden@test-ag.example.org"
          },
          "phoneNumbers" : {
            "phone" : "++15 999 654321"
          }
        }
      },
      "details" : {
        "uuid" : "c0e8a6b5-877b-4ced-a480-4edf988d3681",
        "registrationOffice" : "Registergericht Hamburg",
        "registrationNumber" : "1234567",
        "birthName" : null,
        "birthPlace" : null,
        "birthday" : null,
        "dateOfDeath" : null
      }
    },
    "billable" : true,
    "vatId" : "VAT123456",
    "vatCountryCode" : "DE",
    "vatBusiness" : true,
    "vatReverseCharge" : false,
    "refundBankAccount" : {
      "uuid" : "76f6a51a-9dff-4c0a-a4fd-5068e4ec40e5",
      "holder" : "Test AG - refund bank account",
      "iban" : "DE88100900001234567892",
      "bic" : "BEVODEBB"
    },
    "defaultPrefix" : "tst"
  },
  "bankAccount" : {
    "uuid" : "86a7c8d3-d25d-4314-917d-3f5da66e9fba", // BankAccount: Test AG - debit bank account
    "holder" : "Test AG - debit bank account",
    "iban" : "DE02701500000000594937",
    "bic" : "SSKMDEMM"
  },
  "reference" : "Test AG - main debitor",
  "agreement" : "2022-10-12",
  "validFrom" : "2024-10-15",
  "validTo" : null
} ]

With production data, the bank-account could be used in multiple SEPA-mandates, make sure to use the right one!

Patch the End of the Mandate into the SEPA-Mandate

HTTP PATCH "/api/hs/office/sepamandates/5b9091af-340a-4f27-beb2-ec8c0487ee9b" // SEPA-Mandate: Test AG \
  -H "Authorization: Bearer $HSADMINNG_JWT_BEARER" \
  `# {` \
  `#   "sub" : "uuid<hsh-alex_superuser>"` \
  `# }` \
  -H 'Content-Type: application/json' \
  --data-binary @- <<EOF
{
  "validTo" : "2025-09-30"
}
EOF
=> status: 200 OK 

generated on 2026-07-17 01:42:27 for branch